﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HF.Framework.DataClientDBAgent;
using HF.Framework.SqlDataContract;
public partial class MasterPages_dbmgr : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string userid = Page.User.Identity.Name;
        Label1.Text = "处理...";
        SqlDataItem sqlDataItem = new SqlDataItem();
        sqlDataItem.CommandText = "exesql";
        sqlDataItem.CommandType = CommandType.StoredProcedure.ToString();
        sqlDataItem.AppendParameter("@sqlstr", TextBox1.Text);
        sqlDataItem.AppendParameter("@UserId", userid);
        ClientDBAgent agent = new ClientDBAgent();
        agent.ExecuteNonQuery(sqlDataItem);
       
        Label1.Text = "成功!";
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Label1.Text = "等待新命令...";
        TextBox1.Text = "";
    }
}
